package com.ssy.lingxi.marketing.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.marketing.api.model.request.ActivityGoodsQuantityCheckRequest;
import com.ssy.lingxi.marketing.api.model.request.CartActivityPriceRequest;
import com.ssy.lingxi.marketing.api.model.response.CartActivityPriceFeignResponse;
import com.ssy.lingxi.marketing.model.vo.activity.response.CartActivityPriceResponse;

import java.util.List;

/**
 * 活动商品计算服务类
 * @author yzc
 * @version 2.0.0
 * @date 2021/9/2
 */
public interface IActivityPriceCalculateService {

    /**
     * 计算购物车-商品活动-到手价
     * @param req
     * @return
     */
    Wrapper<List<CartActivityPriceResponse>> calculateActivityPrice(UserLoginCacheDTO loginUser, List<CartActivityPriceRequest> req);
    /**
     * 计算购物车-商品活动-到手价(内部调用)
     * @param req
     * @return
     */
    Wrapper<List<CartActivityPriceFeignResponse>> calculateActivityPriceByFeign(UserLoginCacheDTO loginUser, List<CartActivityPriceRequest> req);

    /**
     * 检测添加到购物车的商品的数量
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<Double> checkQuantityByAddCart(UserLoginCacheDTO sysUser, ActivityGoodsQuantityCheckRequest request);
}
